//
//  ConsultCollectionViewCellTwoCollectionViewCell.m
//  110
//
//  Created by lanou on 16/4/11.
//  Copyright © 2016年 乔砥. All rights reserved.
//

#import "ConsultCollectionViewCellTwoCollectionViewCell.h"
#import "UIImageView+WebCache.h"
@implementation ConsultCollectionViewCellTwoCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.myImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, (KWIDTH  - 15)/ 2, (KWIDTH  - 15)/ 2)];
        self.myImageView.layer.cornerRadius = 5;
        self.myImageView.layer.masksToBounds = YES;
        [self.contentView addSubview:_myImageView];
        
        
        self.myView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, (KWIDTH  - 15)/ 2, (KWIDTH  - 15)/ 2)];
        self.myView.backgroundColor = [UIColor blackColor];
        self.myView.alpha = 0.4;
        [self.myImageView addSubview:_myView];
        
        
        
        self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(13, 30, 150,50)];
        self.titleLabel.textColor = [UIColor whiteColor];
        self.titleLabel.numberOfLines = 0;
        [self.myImageView addSubview:_titleLabel];
        
        
        self.addTimeLabel = [[UILabel alloc]initWithFrame:CGRectMake(34, 95, 150, 50)];
        self.addTimeLabel.textColor = [UIColor whiteColor];
        self.addTimeLabel.numberOfLines = 0;
        [self.myImageView addSubview:_addTimeLabel];
        
        
        
        
        
        
    }
    
    return self;
    
}



-(void)getData:(ConsultModel2 *)model
{
    
    _titleLabel.text = model.title;
    _addTimeLabel.text = model.addTime;
    [_myImageView sd_setImageWithURL:[NSURL URLWithString:model.thumbnail]];
    
    
    
    
    
    
}


@end